package com.getee.tianchaohongyu.kopier

import org.junit.Test


/**
 * 测试类
 * created zpf on 2019/2/18 0018
 */
open class KopierTest {

    @Test
    open fun test() {
        val expression = """
                id,name,nickName,
                balance(#.##),
                registerTime(yyyy-MM-dd HH:mm:ss),
                level[id,name],
                accountList[name,balance],
                petList[
                    id,name,imgUrl,
                    status[text,value]
                ]
        """
        println(expression)

        val iterator = expression.chars().iterator()
        val list = Kopier().parse(iterator)
        println(list.joinToString { it.toString() })
    }
}